package org.phoenix.mall.admin.common.pojo.bo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.phoenix.mall.admin.common.pojo.vo.AttributeVO;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Data
@ApiModel(value = "商品信息表单数据对象", description = "封装商品信息表单数据的BO")
public class GoodsBO {
    @ApiModelProperty(value = "商品名称", name = "name", example = "XXX", required = true)
    private String name;

    @ApiModelProperty(value = "商品价格", name = "price", example = "36.4", required = true)
    private BigDecimal price;

    @ApiModelProperty(value = "商品重量", name = "weight", example = "20", required = true)
    private BigDecimal weight;

    @ApiModelProperty(value = "商品库存量", name = "stockQuantity", example = "100", required = true)
    private Integer stockQuantity;

    @ApiModelProperty(value = "所属分类", name = "categoryIds", example = "1,2,3", required = true)
    private String categoryIds;

    @ApiModelProperty(value = "商品介绍", name = "introduce", example = "XXX", required = true)
    private String introduce;

    @ApiModelProperty(value = "商品图片", name = "images", example = "xxx.jpg,xxx.jpg,xxx.jpg", required = true)
    private String images;

    @ApiModelProperty(value = "商品属性", name = "attrs", example = "", required = true)
    private InnerAttribute attrs;


    @Data
    public class InnerAttribute {
        List<AttributeVO> dynamicAttributeList;
        List<AttributeVO> staticAttributeList;

    }
}
